FROM openjdk:8-jre
ARG JAR_NAME
ENV TZ=Asia/Shanghai
ENV JAR_NAME=${JAR_NAME}
VOLUME /home/work
RUN mkdir -p /home/work
WORKDIR /home/work
COPY target/${JAR_NAME}.jar /home/work/${JAR_NAME}.jar
ENTRYPOINT exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar ${JAR_NAME}.jar --spring.profiles.active=${ACTIVE}
